package com.yxt.shecaiyun.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yxt.shecaiyun.entity.Club;
import com.yxt.shecaiyun.mapper.ClubMapper;
import com.yxt.shecaiyun.service.ClubService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service   //表明是个service
public class ClubServiceImpl extends ServiceImpl<ClubMapper, Club> implements ClubService {
    @Autowired
    private ClubMapper clubMapper;

    //返回club的信息
    @Override
    public List<Club> findAllClub() {

        List<Club> clubs = clubMapper.selectList(null);
        clubs.forEach(System.out::println);
        return clubs;
    }
}
